<!--
 * @Author: your name
 * @Date: 2020-12-27 12:48:22
 * @LastEditTime: 2021-03-26 18:14:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \white-jotter-blog-vue\src\components\content\library\LibrarySideMenu.vue
-->
<template>
  <div class="SideMenu">
    <el-menu class="categories" default-active="0" active-text-color="red" @select="handleSelect">
      <el-menu-item index="0"> <i class="el-icon-menu"></i><span slot="title">全部</span> </el-menu-item>
      <el-menu-item index="1"> <i class="el-icon-menu"></i><span slot="title">文学</span> </el-menu-item>
      <el-menu-item index="2"> <i class="el-icon-menu"></i><span slot="title">流行</span> </el-menu-item>
      <el-menu-item index="3"> <i class="el-icon-menu"></i><span slot="title">文化</span> </el-menu-item>
      <el-menu-item index="4"> <i class="el-icon-menu"></i><span slot="title">生活</span> </el-menu-item>
      <el-menu-item index="5"> <i class="el-icon-menu"></i><span slot="title">经管</span> </el-menu-item>
      <el-menu-item index="6"> <i class="el-icon-menu"></i><span slot="title">科技</span> </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "SideMenu",
  data() {
    return {
      cid: "",
    };
  },
  created() {},
  methods: {
    handleSelect(key, keyPath) {
      this.cid = key;
      this.$emit("indexSelect");

    },
  },
};
</script>

<style lang="less" scoped>
.categories {
  position: fixed;
  left: 100px;
  top: 180px;
  width: 150px;
}
</style>
